<template>
  <div>
    <!-- 面包屑导航区域 -->
    <el-breadcrumb separator-class="el-icon-arrow-right">
      <el-breadcrumb-item :to="{ path: '/index' }">首页</el-breadcrumb-item>
      <el-breadcrumb-item>代办事项</el-breadcrumb-item>
    </el-breadcrumb>
    <el-card>

      <el-table border stripe :data="data">
              <el-table-column label="序号" type="index"> </el-table-column>
              <el-table-column label="部门" prop="departmentName">
              </el-table-column>
              <el-table-column label="工号" prop="jobNumber">
              </el-table-column>
              <el-table-column label="用户名" prop="username"> </el-table-column>
              <el-table-column label="流程名称" prop="processName">
              </el-table-column>
              <el-table-column label="创建时间" prop="procApplyTime">
              </el-table-column>
      </el-table>
       </el-card>
  </div>
</template>

<script>
export default {
  data() {
    return {
      one: {
        jobNumber: "",
        processKey: "",
        processState: "",
        processName: "",
        departmentName: "",
        procCurrNodeUserGroup: "",
        currentPage: 1,
        pageSize: 10,
      },
      data:[],
    };
  },
  created() {
    this.get();
  },
  methods: {
    get() {
      let role = JSON.parse(sessionStorage.getItem("rolee"));
      console.log(role.role);
      const arr = role.role.split("_");
      console.log(arr[1]);
      this.one.procCurrNodeUserGroup = arr[1];
      this.$http.post("audit/instanceQuery", this.one).then((res) => {
        console.log(res);
        this.data=res.data.rows;

        // if (res.data.flag !== true) {
        //   return this.$message.error("获取我的审批信息失败!");
        // }
      });
    },
    doAdd(e) {
      //1.获取文本框输入的值，2，把文本框的值push到list里面
      if (e.keyCode == 13) {
        //传入的event表示按键，13表示回车键，如果按回车则执行方法
        this.list.push({ title: this.todo, checked: true });
      }
    },
    removeData(key) {
      //根据索引从list中删除该对象元素
      // js操作数组的方法
      this.list.splice(key, 1);
    },
  },
};
</script>

<style scoped></style>
